<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateHistoricoDocumentoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
            </h:panelGroup>
            <h:form>
                <p:growl id="messages" life="3000"/>
                <p:panel>

                    <f:facet name="header">
                        <h:outputText value="#{bundle.LegendHistoricoDocumentoTitle}"/>
                    </f:facet>          

                    <h:panelGrid columns="2">
                        <ui:remove>
                            <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcId}" for="hdcId" />
                            <p:inputText id="hdcId" value="#{historicoDocumentoController.selected.hdcId}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcId}" required="true" requiredMessage="#{bundle.CreateHistoricoDocumentoRequiredMessage_hdcId}"/>
                        </ui:remove>
                        <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcDt}" for="hdcDt" />
                        <p:inputText id="hdcDt" value="#{historicoDocumentoController.selected.hdcDt}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcDt}" >
                            <f:convertDateTime pattern="#{bundle.patternApp}" />
                        </p:inputText>
                        <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcTxObservacao}" for="hdcTxObservacao" />
                        <p:inputText id="hdcTxObservacao" value="#{historicoDocumentoController.selected.hdcTxObservacao}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcTxObservacao}" />
                        <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcTopId}" for="hdcTopId" />
                        <h:selectOneMenu id="hdcTopId" value="#{historicoDocumentoController.selected.hdcTopId}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcTopId}" required="true" requiredMessage="#{bundle.CreateHistoricoDocumentoRequiredMessage_hdcTopId}">
                            <f:selectItems value="#{tipoOperacaoController.itemsAvailableSelectOne}"/>
                        </h:selectOneMenu>
                        <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcShdId}" for="hdcShdId" />
                        <h:selectOneMenu id="hdcShdId" value="#{historicoDocumentoController.selected.hdcSdcId}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcShdId}" >
                            <f:selectItems value="#{statusDocController.itemsAvailableSelectOne}"/>
                        </h:selectOneMenu>
                        <h:outputLabel value="#{bundle.CreateHistoricoDocumentoLabel_hdcTcmId}" for="hdcTcmId" />
                        <h:selectOneMenu id="hdcTcmId" value="#{historicoDocumentoController.selected.hdcTcmId}" title="#{bundle.CreateHistoricoDocumentoTitle_hdcTcmId}" required="true" requiredMessage="#{bundle.CreateHistoricoDocumentoRequiredMessage_hdcTcmId}">
                            <f:selectItems value="#{controleDocumentoController.itemsAvailableSelectOne}"/>
                        </h:selectOneMenu>
                    </h:panelGrid>
                    <br />

                    <p:commandButton ajax="false" rendered="#{!autenticadorController.loginVisualizador}" icon="ui-icon-disk" action="#{historicoDocumentoController.create}" value="#{bundle.CreateHistoricoDocumentoSaveLink}" /> &nbsp;
                    <p:commandButton ajax="false" action="#{historicoDocumentoController.prepareList}" value="#{bundle.CreateHistoricoDocumentoShowAllLink}" immediate="true"/>

                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
